#include "cpu/exec/template-start.h"

#define instr lods

 static void do_execute()
 {
    int dir;
    if(cpu.eflags.DF == 0) dir = 1;
    else dir = -1;
    DATA_TYPE data = (DATA_TYPE)swaddr_read(cpu.esi, DATA_BYTE);
    concat(reg_,SUFFIX)(R_EAX) = data;
    cpu.esi += dir * DATA_BYTE;
    print_asm("lods" str(SUFFIX));
}

make_helper(concat(lods_,SUFFIX))
{
    do_execute();
    return 1;
}
#include "cpu/exec/template-end.h"